<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>奶茶店后台管理系统</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
</head>

<style>
    .img{
        max-height:200px;
        max-width: 200px;
        vertical-align:middle;
    }
</style>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<!--    引入导航栏组件-->
    <div th:insert="components/main::navbar"></div>
<!--    引入侧边栏组件 -->
    <div th:insert="components/main::siderbarproductmanage"></div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
<!--        productmanage.html-->

        <table class="layui-table">
            <thead>
            <tr>
                <td>奶茶ID</td>
                <td>奶茶名</td>
                <td>分类</td>
                <td>说明</td>
                <td>图片</td>
                <td>价格</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody>
                <tr th:each="one:${AllData}">
                    <td th:text="${one.getId()}"></td>
                    <td th:text="${one.getName()}"></td>
                    <td th:text="${one.getCategory()}"></td>
                    <td th:text="${one.getRemark()}"></td>
                    <td>
                        <img th:src="${one.getPicdata()}" alt="图片失效，请联系管理员！">
                    </td>
                    <td th:text="${one.getPrice()}"></td>
                    <td>
                    <a class="layui-btn layui-btn-radius layui-btn-warm" th:href="@{/manage/edit(id=${one.getId()})}">
                        <i class="layui-icon">&#xe642;</i>
                        编辑
                    </a>
                    <a 	class="layui-btn layui-btn-radius layui-btn-danger" th:href="@{/manage/delete(id=${one.getId()})}">
                        <i class="layui-icon">&#x1006;</i>
                        删除
                    </a>
                </td>
                </tr>
            </tbody>
        </table>

    </div>

    <div th:insert="components/main::bottombar"></div>

</div>
<script th:src="@{/layui/layui.js}"></script>
</body>
</html>